package zzz.fmltuor.event;


import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.event.entity.EntityJoinLevelEvent;
import net.minecraftforge.eventbus.api.listener.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.internal.TextComponentMessageFormatHandler;
import net.minecraftforge.server.command.TextComponentHelper;

import java.awt.*;


@EventBusSubscriber
public class EventHandler {
    @SubscribeEvent
    public static void onPlayerJoin(EntityJoinLevelEvent event) {
        Entity entity = event.getEntity();
        if (entity instanceof Player) {
            Player player = (Player) entity;
            String message = "Welcome to FMLTutor," + entity.getName() + "!";
            player.displayClientMessage();
        }
    }
}

